<template>
  <div>
    <div>{{ num }}</div>
    <div>我是{{ obj.uname }}</div>
    <div>我今年{{ obj.age }}岁</div>
    <div>我的爱好是{{ obj.age > 30 ? obj.hobby[0] : obj.hobby2[0] }}</div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      num: 20,
      obj: {
        uname: 'ikun',
        age: 72,
        hobby: ['打篮球', '唱', '跳'],
        hobby2: ['抽', '喝', '烫'],
      },
    }
  },
}
</script>

<style scoped></style>
